package com.itkim.qian.exception;

import com.ruoyi.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
@Slf4j
public class ExceptionAdvice {

    @ExceptionHandler(Exception.class)
    public AjaxResult ExceptionHandler(Exception e){
        log.info("异常信息：{}",e.getMessage());
        return AjaxResult.error(e.getMessage());
    }
}
